<?php
$T->loadTpl("./html/".$template."/".$qname.".html");
$T->SetTpl('cssjs','html/cssjs.inc'); 
$T->SetTpl('jsmodel','html/jsmodel.inc');     
  
$id=isset($_GET["id"])?$_GET["id"]:"0";
if($id!="0"){
$user=$T->db->query("select * from sys_member where id='".$id."'")->fetch(PDO::FETCH_ASSOC);
$T->Set("id",$user["id"]);
$T->Set("username",$user["username"]);
$T->Set("nick",$user["nick"]);
$T->Set("truename",$user["truename"]);
$T->Set("used_name",$user["used_name"]);
$T->Set("ename",$user["ename"]);
$T->Set("sex",$user["sex"]);
$T->Set("idnumber",$user["idnumber"]);
$T->Set("worknum",$user["worknum"]);
$T->Set("nation",$user["nation"]);
$T->Set("political_status",$user["political_status"]);
$T->Set("birthday",$user["birthday"]);
$T->Set("areaid",$user["areaid"]);
$T->Set("addr",$user["addr"]);
$T->Set("email",$user["email"]);
$T->Set("qq",$user["qq"]);
$T->Set("mobile",$user["mobile"]);
$T->Set("tel",$user["tel"]);
$T->Set("idtype",$user["idtype"]);
$T->Set("department",$user["department"]);
$T->Set("duty",$user["duty"]);
$T->Set("dutytitle",$user["dutytitle"]);
$T->Set("role",$user["role"]);
$T->Set("school",$user["school"]);
$T->Set("hobbies",$user["hobbies"]);
$T->Set("state",$user["state"]);
}else{
$T->Set("nation","");
$T->Set("political_status","");
$T->Set("idtype","");
$T->Set("department","");
$T->Set("duty","");
$T->Set("dutytitle","");
$T->Set("role","");
$T->Set("school","");
$T->Set("areaid","");
$T->Set("state",0);
$T->Set("sex",0);
}
        
$T->Set("template",$template);         
$T->clearNaN();       
$T->clearNoN();
$T->display(); 